import cv2
import matplotlib.pyplot as plt

img = cv2.imread(r"/\images\005.jpeg", cv2.IMREAD_GRAYSCALE)
cv2.imshow("test", img)

# plt.figure("origin")
# plt.hist(img.ravel(), 256)

img1 = cv2.equalizeHist(img)
cv2.imshow("test1", img1)

# plt.figure("equalize")
# plt.hist(img1.ravel(), 256)

clahe = cv2.createCLAHE(clipLimit=5)
img2 = clahe.apply(img)
cv2.imshow("test12", img2)

cv2.waitKey(0)
# plt.show()